import request from "@/utils/request.js";

// 获取用户企业信息
export function getWxUserInfo() {
  return request({
    url: "/xcx/zp/my/getWxUserInfo",
    method: "get",
  });
}
// 修改用户信息 （仅支持头像、名称 ）
export function exitUserInfo(data) {
  return request({
    url: "/xcx/zp/my/exitUserInfo",
    method: "put",
    data,
  });
}
// 获取岗位数量、收藏数量、申请数量
export function getQuantitys() {
  return request({
    url: "/xcx/zp/my/getQuantitys",
    method: "get",
  });
}
// 查询企业资料
export function getEntInfo() {
  return request({
    url: "/xcx/zp/my/getEntInfo",
    method: "get",
  });
}
// 保存企业资料
export function saveEnterprise(data) {
  return request({
    url: "/xcx/zp/my/saveEnterprise",
    method: "post",
    data,
  });
}
// 我的收藏列表

export function getCollectList(params) {
  return request({
    url: "/xcx/zp/my/getCollectList",
    method: "get",
    params,
  });
}
// 申请开通VIP
export function applyFor() {
  return request({
    url: "/xcx/zp/my/applyFor",
    method: "post",
  });
}

// 获取账户余额及银行账号信息 --财务管理
export function getBalance() {
  return request({
    url: "/xcx/zp/my/getBalance",
    method: "get",
  });
}
// 修改企业账户信息 --财务管理
export function accountInfo(data) {
  return request({
    url: "/xcx/zp/my/accountInfo",
    method: "put",
    data,
  });
}
// 查询账户流水 --财务管理
export function getAccountLog(data) {
  return request({
    url: "/xcx/zp/my/getAccountLog",
    method: "get",
    data,
  });
}
// 结算管理
export function getSettlementInfoList(params) {
  return request({
    url: "/xcx/zp/my/getSettlementInfoList",
    method: "get",
    params,
  });
}
// 结算管理-确认结算
export function postAffirm(data) {
  return request({
    url: "/xcx/zp/my/affirm",
    method: "post",
    data,
  });
}
// 结算管理-拒绝结算
export function postRefuseAffirm(settlementId) {
  return request({
    url: `/xcx/zp/my/refuseAffirm/${settlementId}`,
    method: "get"
  });
}
// 获取结算信息详细列表
export function getSettlementDetails(params) {
  return request({
    url: `/xcx/zp/my/getSetlementDetails`,
    method: "get",
    params,
  });
}
// 修改确认状态 注：传递对应标识 1=已确认、3=已拒绝
export function exitSettlementState(data) {
  return request({
    url: "/xcx/zp/my/exitSettlementState",
    method: "put",
    data,
  });
}
// 企业认证提交
export const postAuthEnterprise = (data) => {
  return request({
    url: "/xcx/zp/my/authEnterprise",
    method: "post",
    data,
  });
};

// 查询企业认证详情
export const getAuthDetailsAPI = () => {
  return request({
    url: "/xcx/zp/my/getAuthDetails",
    method: "get",
  });
};

// 财务管理列表
export const getAccountLogList = (params) => {
  return request({
    url: "/xcx/zp/my/getAccountLog",
    method: "get",
    params,
  });
};

// 财务管理详情
export const getBalanceDetails = () => {
  return request({
    url: "/xcx/zp/my/getBalance",
    method: "get",
  });
};

// 修改财户信息
export const putWealthInfo = (data) => {
  return request({
    url: "/xcx/zp/my/accountInfo",
    method: "put",
    data,
  });
};

// 积分列表
export const getIntegralTaskListAPI = (params) => {
  return request({
    url: "/xcx/zp/my/getIntegralTaskList",
    method: "get",
    params,
  });
};

// 获取积分/签到状态
export const getIntegralSignAPI = () => {
  return request({
    url: "/xcx/zp/my/getIntegralSign",
    method: "get",
  });
};

// 获取积分流水
export const getIntegralLogAPI = (params) => {
  return request({
    url: "/xcx/zp/my/getIntegralLog",
    method: "get",
    params,
  });
};

// 人才库
export const getTalentsListAPI = (data) => {
  return request({
    url: "/xcx/zp/my/talentsList",
    method: "post",
    data,
  });
};

// 修改企业信息
export const putExitUserInfo = (data) => {
  return request({
    url: "/xcx/zp/my/exitUserInfo",
    method: "put",
    data,
  });
};

// 人才库列表
export const talentsListAPI = (data) => {
  return request({
    url: "/xcx/zp/my/talentsList",
    method: "post",
    data,
  });
};
// 获取托管信息
export const getTrusteeshipInfoAPI = () => {
  return request({
    url: "/xcx/zp/my/getTrusteeshipInfo",
    method: "get",
  });
};

// 设置门店托管
export const trusteeshipAPI = (data) => {
  return request({
    url: "/xcx/zp/my/trusteeship",
    method: "put",
    data,
  });
};

// 获取协议信息 关于我们、帮助文档、法律咨询
export const agreementTextAPI = (type) => {
  return request({
    url: `/xcx/zp/my/agreement/${type}`,
    method: "get",
  });
};

// 签到
export const toSignAPI = () => {
  return request({
    url: `/xcx/zp/my/sign`,
    method: "put",
  });
};
